sdApp.config(function ($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.otherwise('/');

    $stateProvider.state('simplydecide', {
        url: '/',
        templateUrl: "components/home/home-main.html",
        controller: "HomeController",
        resolve: {
            "homeData": function (RESTService) {
                return RESTService.load('/homepage');
            }
        }
    }).state('dashboard',{
        url:'/home',
        templateUrl: "components/dash/dash-main.html",
        controller: "DashController",
        resolve: {
            "profileData": function (RESTService) {
                return RESTService.load('/dashboard');
            }
        }
    }).state('question',{
        url:'/decision/:id',
        templateUrl: "components/question/question-main.html",
        controller: "QuestionController",
        resolve: {
            "questionData": function (RESTService,$stateParams) {
                return RESTService.load('/question/'+$stateParams.id);
            }
        }
    }).state('search',{
        url:'/search/:id',
        templateUrl: "components/search/search.html",
        controller: "SearchController",
        resolve: {
            "searchData": function (RESTService,$stateParams) {
                return RESTService.load('/search/'+$stateParams.id);
            }
        }
    })
});

